import { h, render } from 'vue'
import Modal from './modal.vue'

export interface Props {
	title?: string
	content?: string
	ok?: () => Promise<void>
	cancel?: () => void
	okText?: string
	cancelText?: string
}

export default function (props: Props) {
	const container = document.createElement('div')
	const vNode = h(Modal, props)
	render(vNode, container)
	document.body.appendChild(container)
}
